#include <iostream>
using std::cout ; 
using std::endl ; 

#include "FlagType.hpp"

FlagType::FlagType(bool* variable,string flag, string shortDescription,bool defaultValue,string longDescription,string group,int order ) 
{
	 mFlag = flag ;  
	 mShortDescription = shortDescription ; 
   mDefaultValue = defaultValue ; 
	 mLongDescription = longDescription ; 
	 mGroup = group ; 
	 mOrder = order ; 
	 mValue = variable ; 
}


void FlagType::setFlag(bool value) 
{
	 *mValue = value ; 
}

string FlagType::getValueAsString() 
{
	if(mValue==NULL){
		return "NULL" ;
	}

	if(*mValue==true){
		return "true";
	}
	else{
		return "false";
	}
}


string FlagType::getDefaultAsString()   
{
	if(mDefaultValue==true){
		return "true";
	}
	else{
		return "false";
	}
}



// -*- C++ -*-

// (C) 2006 by Nathan Dunn, <ndunn@mac.com>


